home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / minix / gccdif~1.z / gccdif~1 / gcc.man < prev    next >
Encoding:
Text File  |  1989-09-30  |  42.2 KB  |  1,255 lines

  1.  
  2.  
  3.  
  4. GCC(1)                    USER COMMANDS                    GCC(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      gcc - GNU project C Compiler
  10.  
  11. SYNOPSIS
  12.      gcc [ options ] files
  13.  
  14. WARNING
  15.      This man page is an extract of the documentation of the  GNU
  16.      C compiler and is limited to the meaning of the options.  It
  17.      is updated only occasionally, because the GNU  project  does
  18.      not  use  nroff.  For complete, current documentation, refer
  19.      to the Info file gcc or the DVI file gcc.dvi which are  made
  20.      from the Texinfo source file gcc.texinfo.
  21.  
  22. DESCRIPTION
  23.      The GNU C compiler uses a command syntax much like the  Unix
  24.      C  compiler.  The gcc program accepts options and file names
  25.      as operands.  Multiple  single-letter  options  may  not  be
  26.      grouped:  -dr is very different from -d -r.  When you invoke
  27.      GNU CC, it normally does preprocessing, compilation,  assem-
  28.      bly  and linking.  File names which end in .c are taken as C
  29.      source to be preprocessed and compiled; file names ending in
  30.      .i are taken as preprocessor output to be compiled; compiler
  31.      output files plus any input files with names  ending  in  .s
  32.      are  assembled;  then  the  resulting object files, plus any
  33.      other input files, are linked together to produce an execut-
  34.      able.   Command options allow you to stop this process at an
  35.      intermediate stage.  For example, the -c option says not  to
  36.      run  the  linker.   Then the output consists of object files
  37.      output by the assembler.  Other command options  are  passed
  38.      on  to  one  stage  of processing.  Some options control the
  39.      preprocessor and others  the  compiler  itself.   Yet  other
  40.      options  control  the  assembler  and  linker; these are not
  41.      documented here, but you rarely need to use any of them.
  42.  
  43. OPTIONS
  44.      Here are the options to control the overall compilation pro-
  45.      cess,  including  those that say whether to link, whether to
  46.      assemble, and so on.
  47.  
  48.      -o file
  49.           Place output in file file.  This applies regardless  to
  50.           whatever  sort  of output is being produced, whether it
  51.           be an executable file, an  object  file,  an  assembler
  52.           file or preprocessed C code.
  53.  
  54.           If -o is not specified, the default is to put  an  exe-
  55.           cutable  file  in  a.out,  the  object file source.c in
  56.           source.o, an assembler file in  source.s,  and  prepro-
  57.           cessed C on standard output.
  58.  
  59.      -c   Compile or assemble the source files, but do not  link.
  60.  
  61.  
  62.  
  63. Version 1.36        Last change: 18 June 1989                   1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. GCC(1)                    USER COMMANDS                    GCC(1)
  71.  
  72.  
  73.  
  74.           Produce object files with names made by replacing .c or
  75.           .s with .o at the end of  the  input  file  names.   Do
  76.           nothing at all for object files specified as input.
  77.  
  78.      -S   Compile into assembler code but do not  assemble.   The
  79.           assembler output file name is made by replacing .c with
  80.           .s at the end of the input file name.   Do  nothing  at
  81.           all  for  assembler source files or object files speci-
  82.           fied as input.
  83.  
  84.      -E   Run only the C  preprocessor.   Preprocess  all  the  C
  85.           source  files specified and output the results to stan-
  86.           dard output.
  87.  
  88.      -v   Compiler driver program prints the commands it executes
  89.           as it runs the preprocessor, compiler proper, assembler
  90.           and linker.  Some of these are directed to print  their
  91.           own version numbers.
  92.  
  93.      -pipe
  94.           Use pipes rather than temporary files for communication
  95.           between  the various stages of compilation.  This fails
  96.           to work on some systems where the assembler  is  unable
  97.           to read from a pipe; but the GNU assembler has no trou-
  98.           ble.
  99.  
  100.      -Bprefix
  101.           Compiler driver program tries prefix as  a  prefix  for
  102.           each  program it tries to run.  These programs are cpp,
  103.           cc1, as and ld.
  104.  
  105.           For each subprogram to  be  run,  the  compiler  driver
  106.           first tries the -B prefix, if any.  If that name is not
  107.           found, or if -B was not specified, the driver tries two
  108.           standard   prefixes,   which   are   /usr/lib/gcc-  and
  109.           /usr/local/lib/gcc-.  If neither of those results in  a
  110.           file name that is found, the unmodified program name is
  111.           searched for using the directories  specified  in  your
  112.           PATH environment variable.
  113.  
  114.           The run-time support file gnulib is also  searched  for
  115.           using  the  -B  prefix,  if needed.  If it is not found
  116.           there, the two standard prefixes above are  tried,  and
  117.           that is all.  The file is left out of the link if it is
  118.           not found by those means.  Most of the  time,  on  most
  119.           machines, you can do without it.
  120.  
  121.           You can get a similar result from the environment vari-
  122.           able  GCC_EXEC_PREFIX;  if  it is defined, its value is
  123.           used as a prefix in the  same  way.   If  both  the  -B
  124.           option  and  the  GCC_EXEC_PREFIX variable are present,
  125.           the  -B  option  is  used  first  and  the  environment
  126.  
  127.  
  128.  
  129. Version 1.36        Last change: 18 June 1989                   2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. GCC(1)                    USER COMMANDS                    GCC(1)
  137.  
  138.  
  139.  
  140.           variable value second.
  141.  
  142.      -bprefix
  143.           The argument prefix is used as a second prefix for  the
  144.           compiler  executables  and  libraries.   This prefix is
  145.           optional: the compiler tries each file first  with  it,
  146.           then without it.  This prefix follows the prefix speci-
  147.           fied with -B or the default prefixes.
  148.  
  149.           Thus, -bvax- -Bcc/ in the presence of environment vari-
  150.           able GCC_EXEC_PREFIX with definition /u/foo/ causes GNU
  151.           CC to try the following file names for the preprocessor
  152.           executable:
  153.  
  154.                cc/vax-cpp
  155.                cc/cpp
  156.                /u/foo/vax-cpp
  157.                /u/foo/cpp
  158.                /usr/local/lib/gcc-vax-cpp
  159.                /usr/local/lib/gcc-cpp
  160.                /usr/lib/gcc-vax-cpp
  161.                /usr/lib/gcc-cpp These options control the details
  162.           of C compilation itself.
  163.  
  164.      -ansi
  165.           Support all ANSI standard C programs.
  166.  
  167.           This turns off certain  features  of  GNU  C  that  are
  168.           incompatible  with  ANSI C, such as the asm, inline and
  169.           typeof keywords, and predefined macros such as unix and
  170.           vax that identify the type of system you are using.  It
  171.           also enables the undesirable and rarely used ANSI  tri-
  172.           graph feature.
  173.  
  174.           The  alternate   keywords   __asm__,   __inline__   and
  175.           __typeof__  continue  to work despite -ansi.  You would
  176.           not want to use them in an ANSI C program,  of  course,
  177.           but it useful to put them in header files that might be
  178.           included in compilations done  with  -ansi.   Alternate
  179.           predefined macros such as __unix__ and __vax__ are also
  180.           available, with or without -ansi.
  181.  
  182.           The -ansi option does not cause non-ANSI programs to be
  183.           rejected gratuitously.  For that, -pedantic is required
  184.           in addition to -ansi.
  185.  
  186.           The macro __STRICT_ANSI__ is predefined when the  -ansi
  187.           option  is  used.   Some  header  files may notice this
  188.           macro and refrain from declaring certain  functions  or
  189.           defining  certain macros that the ANSI standard doesn't
  190.           call for; this is to avoid interfering  with  any  pro-
  191.           grams that might use these names for other things.
  192.  
  193.  
  194.  
  195. Version 1.36        Last change: 18 June 1989                   3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. GCC(1)                    USER COMMANDS                    GCC(1)
  203.  
  204.  
  205.  
  206.      -traditional
  207.           Attempt to support some aspects of traditional  C  com-
  208.           pilers.  Specifically:
  209.  
  210.         * All extern declarations take effect  globally  even  if
  211.           they are written inside of a function definition.  This
  212.           includes implicit declarations of functions.
  213.  
  214.         * The keywords typeof, inline, signed, const and volatile
  215.           are not recognized.
  216.  
  217.         * Comparisons between pointers and  integers  are  always
  218.           allowed.
  219.  
  220.         * Integer types unsigned short and unsigned char  promote
  221.           to unsigned int.
  222.  
  223.         * Out-of-range floating point literals are not an error.
  224.  
  225.         * All  automatic  variables  not  declared  register  are
  226.           preserved  by  longjmp(3C).   Ordinarily, GNU C follows
  227.           ANSI C: automatic variables not declared  volatile  may
  228.           be clobbered.
  229.  
  230.         * In the preprocessor, comments  convert  to  nothing  at
  231.           all,  rather  than to a space.  This allows traditional
  232.           token concatenation.
  233.  
  234.         * In the preprocessor,  macro  arguments  are  recognized
  235.           within  string  constants  in  a  macro definition (and
  236.           their values are stringified, though without additional
  237.           quote  marks, when they appear in such a context).  The
  238.           preprocessor always considers a string constant to  end
  239.           at a newline.
  240.  
  241.         * The predefined macro __STDC__ is not defined  when  you
  242.           use -traditional, but __GNUC__ is (since the GNU exten-
  243.           sions which __GNUC__  indicates  are  not  affected  by
  244.           -traditional).   If you need to write header files that
  245.           work differently depending on whether  -traditional  is
  246.           in  use, by testing both of these predefined macros you
  247.           can distinguish four situations: GNU C, traditional GNU
  248.           C, other ANSI C compilers, and other old C compilers.
  249.  
  250.      -O   Optimize.  Optimizing compilation takes  somewhat  more
  251.           time, and a lot more memory for a large function.
  252.  
  253.           Without -O, the compiler's goal is to reduce  the  cost
  254.           of  compilation  and  to  make  debugging  produce  the
  255.           expected results.  Statements are independent:  if  you
  256.           stop  the program with a breakpoint between statements,
  257.           you can then assign a new  value  to  any  variable  or
  258.  
  259.  
  260.  
  261. Version 1.36        Last change: 18 June 1989                   4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. GCC(1)                    USER COMMANDS                    GCC(1)
  269.  
  270.  
  271.  
  272.           change  the  program  counter to any other statement in
  273.           the function and get  exactly  the  results  you  would
  274.           expect from the source code.
  275.  
  276.           Without -O, only variables declared register are  allo-
  277.           cated  in  registers.  The resulting compiled code is a
  278.           little worse than produced by PCC without -O.
  279.  
  280.           With -O, the compiler tries to  reduce  code  size  and
  281.           execution time.
  282.  
  283.           Some of the -f options described  below  turn  specific
  284.           kinds of optimization on or off.
  285.  
  286.      -g   Produce debugging information in the operating system's
  287.           native format (for DBX or SDB).  GDB also can work with
  288.           this debugging information.
  289.  
  290.           Unlike most other C compilers, GNU CC allows you to use
  291.           -g  with -O.  The shortcuts taken by optimized code may
  292.           occasionally produce surprising results: some variables
  293.           you  declared may not exist at all; flow of control may
  294.           briefly move where you did not expect it;  some  state-
  295.           ments may not be executed because they compute constant
  296.           results or their values  were  already  at  hand;  some
  297.           statements may execute in different places because they
  298.           were moved out of loops.  Nevertheless it proves possi-
  299.           ble  to  debug optimized output.  This makes it reason-
  300.           able to use the optimizer for programs that might  have
  301.           bugs.
  302.  
  303.      -gg  Produce debugging  information  in  GDB's  own  format.
  304.           This  requires the GNU assembler and linker in order to
  305.           work.
  306.  
  307.           This feature  will  probably  be  eliminated.   It  was
  308.           intended to enable GDB to read the symbol table faster,
  309.           but it doesn't result in enough  of  a  speedup  to  be
  310.           worth  the larger object files and executables.  We are
  311.           working on other ways of making GDB start even  faster,
  312.           which  work  with  DBX format debugging information and
  313.           could be made to work with SDB format.
  314.  
  315.      -w   Inhibit all warning messages.
  316.  
  317.      -W   Print extra warning messages for these events:
  318.  
  319.         * An automatic variable is used without first being  ini-
  320.           tialized.
  321.  
  322.           These warnings are possible only in optimizing compila-
  323.           tion,  because  they require data flow information that
  324.  
  325.  
  326.  
  327. Version 1.36        Last change: 18 June 1989                   5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. GCC(1)                    USER COMMANDS                    GCC(1)
  335.  
  336.  
  337.  
  338.           is computed only when optimizing.  If you don't specify
  339.           -O, you simply won't get these warnings.
  340.  
  341.           These warnings occur only for variables that are candi-
  342.           dates  for register allocation.  Therefore, they do not
  343.           occur for a variable  that  is  declared  volatile,  or
  344.           whose  address is taken, or whose size is other than 1,
  345.           2, 4 or 8 bytes.  Also, they do not  occur  for  struc-
  346.           tures,  unions  or arrays, even when they are in regis-
  347.           ters.
  348.  
  349.           Note that there may be no warning about a variable that
  350.           is  used  only  to compute a value that itself is never
  351.           used, because such computations may be deleted by  data
  352.           flow analysis before the warnings are printed.
  353.  
  354.           These warnings are made optional because GNU CC is  not
  355.           smart  enough to see all the reasons why the code might
  356.           be correct despite appearing to have an error.  Here is
  357.           one example of how this can happen:
  358.  
  359.                {
  360.                  int x;
  361.                  switch (y)
  362.                    {
  363.                    case 1: x = 1;
  364.                      break;
  365.                    case 2: x = 4;
  366.                      break;
  367.                    case 3: x = 5;
  368.                    }
  369.                  foo (x);
  370.                }
  371.  
  372.           If the value of y is always 1, 2 or 3, then x is always
  373.           initialized,  but  GNU  CC  doesn't know this.  Here is
  374.           another common case:
  375.  
  376.                {
  377.                  int save_y;
  378.                  if (change_y) save_y = y, y = new_y;
  379.                  ...
  380.                  if (change_y) y = save_y;
  381.                }
  382.  
  383.           This has no bug because save_y is used only  if  it  is
  384.           set.
  385.  
  386.           Some spurious warnings can be avoided if you declare as
  387.           volatile all the functions you use that never return.
  388.  
  389.         * A nonvolatile automatic variable might be changed by  a
  390.  
  391.  
  392.  
  393. Version 1.36        Last change: 18 June 1989                   6
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. GCC(1)                    USER COMMANDS                    GCC(1)
  401.  
  402.  
  403.  
  404.           call to longjmp(3C).  These warnings as well are possi-
  405.           ble only in optimizing compilation.
  406.  
  407.           The compiler sees only the  calls  to  setjmp(3C).   It
  408.           cannot  know where longjmp(3C) will be called; in fact,
  409.           a signal handler could call it  at  any  point  in  the
  410.           code.   As  a  result,  you may get a warning even when
  411.           there is in fact no problem because longjmp(3C)  cannot
  412.           in  fact  be  called  at  the place which would cause a
  413.           problem.
  414.  
  415.         * A function can return either with or without  a  value.
  416.           (Falling off the end of the function body is considered
  417.           returning without a value.) For example, this  function
  418.           would evoke such a warning:
  419.  
  420.                foo (a)
  421.                {
  422.                  if (a > 0)
  423.                    return a;
  424.                }
  425.  
  426.           Spurious warnings can occur because  GNU  CC  does  not
  427.           realize that certain functions (including abort(3C) and
  428.           longjmp(3C)) will never return.
  429.  
  430.         * An expression-statement contains no side effects.
  431.  
  432.           In the  future,  other  useful  warnings  may  also  be
  433.           enabled by this option.
  434.  
  435.      -Wimplicit
  436.           Warn whenever a function is implicitly declared.
  437.  
  438.      -Wreturn-type
  439.           Warn whenever a function is defined with a  return-type
  440.           that  defaults  to  int.   Also  warn  about any return
  441.           statement with no  return-value  in  a  function  whose
  442.           return-type is not void.
  443.  
  444.      -Wunused
  445.           Warn whenever a local variable is unused aside from its
  446.           declaration, and whenever a function is declared static
  447.           but never defined.
  448.  
  449.      -Wswitch
  450.           Warn whenever  a  switch  statement  has  an  index  of
  451.           enumeral  type  and lacks a case for one or more of the
  452.           named codes of that enumeration.  (The  presence  of  a
  453.           default  label prevents this warning.) case labels out-
  454.           side the enumeration range also provoke  warnings  when
  455.           this option is used.
  456.  
  457.  
  458.  
  459. Version 1.36        Last change: 18 June 1989                   7
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. GCC(1)                    USER COMMANDS                    GCC(1)
  467.  
  468.  
  469.  
  470.      -Wcomment
  471.           Warn whenever a comment-start sequence /* appears in  a
  472.           comment.
  473.  
  474.      -Wtrigraphs
  475.           Warn if any trigraphs are  encountered  (assuming  they
  476.           are enabled).
  477.  
  478.      -Wall
  479.           All of the above -W options combined.   These  are  all
  480.           the  options  which  pertain  to  usage  that we do not
  481.           recommend and that we believe is always easy to  avoid,
  482.           even in conjunction with macros.
  483.  
  484.           The other -W...  options below are not implied by -Wall
  485.           because  certain  kinds  of  useful  macros  are almost
  486.           impossible to write without causing those warnings.
  487.  
  488.      -Wshadow
  489.           Warn whenever a local variable  shadows  another  local
  490.           variable.
  491.  
  492.      -Wid-clash-len
  493.           Warn whenever two distinct  identifiers  match  in  the
  494.           first len characters.  This may help you prepare a pro-
  495.           gram that will compile with  certain  obsolete,  brain-
  496.           damaged compilers.
  497.  
  498.      -Wpointer-arith
  499.           Warn about anything that depends on the size of a func-
  500.           tion type or of void.  GNU C assigns these types a size
  501.           of 1, for  convenience  in  calculations  with  void  *
  502.           pointers and pointers to functions.
  503.  
  504.      -Wcast-qual
  505.           Warn whenever a pointer is cast so as to remove a  type
  506.           qualifier from the target type.  For example, warn if a
  507.           const char * is cast to an ordinary char *.
  508.  
  509.      -Wwrite-strings
  510.           Give string constants the type  const  char[length]  so
  511.           that copying the address of one into a non-const char *
  512.           pointer will get a warning.  These warnings  will  help
  513.           you  find  at  compile  time code that can try to write
  514.           into a string constant, but only if you have been  very
  515.           careful  about  using  const in declarations and proto-
  516.           types.  Otherwise, it will just be a nuisance; this  is
  517.           why we did not make -Wall request these warnings.
  518.  
  519.      -p   Generate extra code to write profile information  suit-
  520.           able for the analysis program prof(1).
  521.  
  522.  
  523.  
  524.  
  525. Version 1.36        Last change: 18 June 1989                   8
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. GCC(1)                    USER COMMANDS                    GCC(1)
  533.  
  534.  
  535.  
  536.      -pg  Generate extra code to write profile information  suit-
  537.           able for the analysis program gprof(1).
  538.  
  539.      -a   Generate extra code to write  profile  information  for
  540.           basic   blocks,   suitable  for  the  analysis  program
  541.           tcov(1).  Eventually GNU gprof(1) should be extended to
  542.           process this data.
  543.  
  544.      -llibrary
  545.           Search a standard list of  directories  for  a  library
  546.           named   library,   which   is  actually  a  file  named
  547.           liblibrary.a.  The linker uses this file as if  it  had
  548.           been specified precisely by name.
  549.  
  550.           The directories searched include several standard  sys-
  551.           tem directories plus any that you specify with -L.
  552.  
  553.           Normally the files found this way are  library  files--
  554.           archive  files  whose  members  are  object files.  The
  555.           linker handles an archive file by scanning  through  it
  556.           for  members which define symbols that have so far been
  557.           referenced but not defined.  But if the  file  that  is
  558.           found  is  an ordinary object file, it is linked in the
  559.           usual fashion.  The only difference between using an -l
  560.           option  and  specifying a file name is that -l searches
  561.           several directories.
  562.  
  563.      -Ldir
  564.           Add directory dir to the  list  of  directories  to  be
  565.           searched for -l.
  566.  
  567.      -nostdlib
  568.           Don't use the standard  system  libraries  and  startup
  569.           files  when  linking.  Only the files you specify (plus
  570.           gnulib) will be passed to the linker.
  571.  
  572.      -mmachinespec
  573.           Machine-dependent option specifying something about the
  574.           type  of  target machine.  These options are defined by
  575.           the macro TARGET_SWITCHES in the  machine  description.
  576.           The  default  for  the  options is also defined by that
  577.           macro, which enables you to change the defaults.
  578.  
  579.           These are the -m options defined in the  68000  machine
  580.           description:
  581.  
  582.           -m68020
  583.           -mc68020
  584.                Generate output for a 68020 (rather than a 68000).
  585.                This  is  the  default  if  you use the unmodified
  586.                sources.
  587.  
  588.  
  589.  
  590.  
  591. Version 1.36        Last change: 18 June 1989                   9
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. GCC(1)                    USER COMMANDS                    GCC(1)
  599.  
  600.  
  601.  
  602.           -m68000
  603.           -mc68000
  604.                Generate output for a 68000 (rather than a 68020).
  605.  
  606.           -m68881
  607.                Generate output containing 68881 instructions  for
  608.                floating  point.   This  is the default if you use
  609.                the unmodified sources.
  610.  
  611.           -mfpa
  612.                Generate output containing  Sun  FPA  instructions
  613.                for floating point.
  614.  
  615.           -msoft-float
  616.                Generate  output  containing  library  calls   for
  617.                floating point.
  618.  
  619.           -mshort
  620.                Consider type int to be 16 bits wide,  like  short
  621.                int.
  622.  
  623.           -mnobitfield
  624.                Do not use the  bit-field  instructions.   -m68000
  625.                implies -mnobitfield.
  626.  
  627.           -mbitfield
  628.                Do  use  the  bit-field   instructions.    -m68020
  629.                implies  -mbitfield.   This  is the default if you
  630.                use the unmodified sources.
  631.  
  632.           -mrtd
  633.                Use a different  function-calling  convention,  in
  634.                which  functions that take a fixed number of argu-
  635.                ments return with the rtd instruction, which  pops
  636.                their  arguments  while returning.  This saves one
  637.                instruction in the caller since there is  no  need
  638.                to pop the arguments there.
  639.  
  640.                This calling convention is incompatible  with  the
  641.                one normally used on Unix, so you cannot use it if
  642.                you need to call libraries compiled with the  Unix
  643.                compiler.
  644.  
  645.                Also, you must provide function prototypes for all
  646.                functions  that take variable numbers of arguments
  647.                (including printf(3S)); otherwise  incorrect  code
  648.                will be generated for calls to those functions.
  649.  
  650.                In addition, seriously incorrect code will  result
  651.                if  you  call  a function with too many arguments.
  652.                (Normally,   extra   arguments   are    harmlessly
  653.                ignored.)
  654.  
  655.  
  656.  
  657. Version 1.36        Last change: 18 June 1989                  10
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. GCC(1)                    USER COMMANDS                    GCC(1)
  665.  
  666.  
  667.  
  668.                The rtd instruction is supported by the 68010  and
  669.                68020 processors, but not by the 68000.
  670.  
  671.           These  -m  options  are  defined  in  the  Vax  machine
  672.           description:
  673.  
  674.           -munix
  675.                Do not output certain  jump  instructions  (aobleq
  676.                and  so  on)  that  the Unix assembler for the Vax
  677.                cannot handle across long ranges.
  678.  
  679.           -mgnu
  680.                Do output those jump instructions, on the  assump-
  681.                tion  that  you  will assemble with the GNU assem-
  682.                bler.
  683.  
  684.           -mg
  685.                Output code for g-format  floating  point  numbers
  686.                instead of d-format.
  687.  
  688.           These -m switches are supported on the Sparc:
  689.  
  690.           -mfpu
  691.                Generate output containing floating point instruc-
  692.                tions.  This is the default if you use the unmodi-
  693.                fied sources.
  694.  
  695.           -msoft-float
  696.                Generate  output  containing  library  calls   for
  697.                floating point.
  698.  
  699.           -mno-epilogue
  700.                Generate separate return instructions  for  return
  701.                statements.   This  has both advantages and disad-
  702.                vantages; I don't recall what they are.
  703.  
  704.           These -m options are  defined  in  the  Convex  machine
  705.           description:
  706.  
  707.           -mc1
  708.                Generate output for a C1.   This  is  the  default
  709.                when the compiler is configured for a C1.
  710.  
  711.           -mc2
  712.                Generate output for a C2.   This  is  the  default
  713.                when the compiler is configured for a C2.
  714.  
  715.           -margcount
  716.                Generate code which puts an argument count in  the
  717.                word  preceding each argument list.  Some nonport-
  718.                able Convex  and  Vax  programs  need  this  word.
  719.                (Debuggers  don't;  this  info  is  in  the symbol
  720.  
  721.  
  722.  
  723. Version 1.36        Last change: 18 June 1989                  11
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. GCC(1)                    USER COMMANDS                    GCC(1)
  731.  
  732.  
  733.  
  734.                table.)
  735.  
  736.           -mnoargcount
  737.                Omit the argument count word.  This is the default
  738.                if you use the unmodified sources.
  739.  
  740.      -fflag
  741.           Specify machine-independent  flags.   Most  flags  have
  742.           both  positive and negative forms; the negative form of
  743.           -ffoo would be -fno-foo.  In the table below, only  one
  744.           of  the  forms  is  listed--the  one  which  is not the
  745.           default.  You can figure out the other form  by  either
  746.           removing no- or adding it.
  747.  
  748.      -fpcc-struct-return
  749.           Use the same convention for returning struct and  union
  750.           values  that  is  used  by the usual C compiler on your
  751.           system.  This convention is less  efficient  for  small
  752.           structures,  and  on many machines it fails to be reen-
  753.           trant; but it has the advantage of allowing intercalla-
  754.           bility between GCC-compiled code and PCC-compiled code.
  755.  
  756.      -ffloat-store
  757.           Do not store  floating-point  variables  in  registers.
  758.           This  prevents undesirable excess precision on machines
  759.           such as the 68000 where the floating registers (of  the
  760.           68881) keep more precision than a double is supposed to
  761.           have.
  762.  
  763.           For most programs, the excess precision does only good,
  764.           but  a  few  programs rely on the precise definition of
  765.           IEEE floating point.  Use -ffloat-store for  such  pro-
  766.           grams.
  767.  
  768.      -fno-asm
  769.           Do not recognize asm, inline or typeof  as  a  keyword.
  770.           These  words  may then be used as identifiers.  You can
  771.           use __asm__, __inline__ and __typeof__ instead.
  772.  
  773.      -fno-defer-pop
  774.           Always pop the arguments to each function call as  soon
  775.           as  that function returns.  Normally the compiler (when
  776.           optimizing) lets arguments accumulate on the stack  for
  777.           several function calls and pops them all at once.
  778.  
  779.      -fstrength-reduce
  780.           Perform the optimizations of  loop  strength  reduction
  781.           and elimination of iteration variables.
  782.  
  783.      -fcombine-regs
  784.           Allow the combine pass to combine an  instruction  that
  785.           copies  one register into another.  This might or might
  786.  
  787.  
  788.  
  789. Version 1.36        Last change: 18 June 1989                  12
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. GCC(1)                    USER COMMANDS                    GCC(1)
  797.  
  798.  
  799.  
  800.           not produce better code when used in addition to -O.  I
  801.           am  interested  in  hearing  about  the difference this
  802.           makes.
  803.  
  804.      -fforce-mem
  805.           Force memory  operands  to  be  copied  into  registers
  806.           before  doing  arithmetic  on  them.   This may produce
  807.           better code by making all memory  references  potential
  808.           common subexpressions.  When they are not common subex-
  809.           pressions, instruction combination should eliminate the
  810.           separate  register-load.   I  am  interested in hearing
  811.           about the difference this makes.
  812.  
  813.      -fforce-addr
  814.           Force memory address constants to be copied into regis-
  815.           ters before doing arithmetic on them.  This may produce
  816.           better code just as -fforce-mem may.  I  am  interested
  817.           in hearing about the difference this makes.
  818.  
  819.      -fomit-frame-pointer
  820.           Don't keep the frame pointer in a  register  for  func-
  821.           tions  that  don't  need one.  This avoids the instruc-
  822.           tions to save, set up and restore  frame  pointers;  it
  823.           also  makes  an  extra register available in many func-
  824.           tions.  It also makes debugging impossible.
  825.  
  826.           On some machines, such as the Vax,  this  flag  has  no
  827.           effect, because the standard calling sequence automati-
  828.           cally handles the frame pointer and nothing is saved by
  829.           pretending  it  doesn't exist.  The machine-description
  830.           macro FRAME_POINTER_REQUIRED controls whether a  target
  831.           machine supports this flag.
  832.  
  833.      -finline-functions
  834.           Integrate all simple functions into their callers.  The
  835.           compiler heuristically decides which functions are sim-
  836.           ple enough to be worth integrating in this way.
  837.  
  838.           If all calls to a given function  are  integrated,  and
  839.           the  function  is declared static, then the function is
  840.           normally not output as assembler code in its own right.
  841.  
  842.      -fcaller-saves
  843.           Enable values to be allocated in registers that will be
  844.           clobbered by function calls, by emitting extra instruc-
  845.           tions to save and restore  the  registers  around  such
  846.           calls.   Such  allocation is done only when it seems to
  847.           result in better code than would otherwise be produced.
  848.  
  849.           This option is enabled by default on certain  machines,
  850.           usually those which have no call-preserved registers to
  851.           use instead.
  852.  
  853.  
  854.  
  855. Version 1.36        Last change: 18 June 1989                  13
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862. GCC(1)                    USER COMMANDS                    GCC(1)
  863.  
  864.  
  865.  
  866.      -fkeep-inline-functions
  867.           Even if all calls to a given function  are  integrated,
  868.           and  the function is declared static, nevertheless out-
  869.           put a separate run-time callable version of  the  func-
  870.           tion.
  871.  
  872.      -fwritable-strings
  873.           Store string constants in the writable data segment and
  874.           don't  uniquize  them.   This is for compatibility with
  875.           old programs which assume they can  write  into  string
  876.           constants.  Writing into string constants is a very bad
  877.           idea; constants should be constant.
  878.  
  879.      -fcond-mismatch
  880.           Allow conditional expressions with mismatched types  in
  881.           the  second  and third arguments.  The value of such an
  882.           expression is void.
  883.  
  884.      -fno-function-cse
  885.           Do not put function addresses in registers;  make  each
  886.           instruction  that calls a constant function contain the
  887.           function's address explicitly.
  888.  
  889.           This option results in less efficient  code,  but  some
  890.           strange  hacks  that  alter the assembler output may be
  891.           confused  by  the  optimizations  performed  when  this
  892.           option is not used.
  893.  
  894.      -fvolatile
  895.           Consider all memory references through pointers  to  be
  896.           volatile.
  897.  
  898.      -fshared-data
  899.           Requests that the data and non-const variables of  this
  900.           compilation  be  shared  data rather than private data.
  901.           The distinction makes sense only on  certain  operating
  902.           systems,  where shared data is shared between processes
  903.           running the same program, while private data exists  in
  904.           one copy per process.
  905.  
  906.      -funsigned-char
  907.           Let the type char be the unsigned, like unsigned char.
  908.  
  909.           Each kind of machine has a default for what char should
  910.           be.  It is either like unsigned char by default or like
  911.           signed char by default.   (Actually,  at  present,  the
  912.           default is always signed.)
  913.  
  914.           The type char is always a  distinct  type  from  either
  915.           signed  char or unsigned char, even though its behavior
  916.           is always just like one of those two.
  917.  
  918.  
  919.  
  920.  
  921. Version 1.36        Last change: 18 June 1989                  14
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928. GCC(1)                    USER COMMANDS                    GCC(1)
  929.  
  930.  
  931.  
  932.           Note that this is equivalent to -fno-signed-char, which
  933.           is the negative form of -fsigned-char.
  934.  
  935.      -fsigned-char
  936.           Let the type char be signed, like signed char.
  937.  
  938.           Note that this  is  equivalent  to  -fno-unsigned-char,
  939.           which is the negative form of -funsigned-char.
  940.  
  941.      -fdelayed-branch
  942.           If supported for the target machine, attempt to reorder
  943.           instructions  to  exploit  instruction  slots available
  944.           after delayed branch instructions.
  945.  
  946.      -ffixed-reg
  947.           Treat the register named reg as a fixed register;  gen-
  948.           erated code should never refer to it (except perhaps as
  949.           a stack pointer, frame pointer or in some  other  fixed
  950.           role).
  951.  
  952.           reg must be the name of a register.  The register names
  953.           accepted  are  machine-specific  and are defined in the
  954.           REGISTER_NAMES macro in the machine  description  macro
  955.           file.
  956.  
  957.           This flag does not have a  negative  form,  because  it
  958.           specifies a three-way choice.
  959.  
  960.      -fcall-used-reg
  961.           Treat the register named reg as an allocatable register
  962.           that  is  clobbered by function calls.  It may be allo-
  963.           cated for temporaries or variables  that  do  not  live
  964.           across  a  call.   Functions compiled this way will not
  965.           save and restore the register REG.
  966.  
  967.           Use of this flag for a register that has a  fixed  per-
  968.           vasive  role  in the machine's execution model, such as
  969.           the stack pointer or frame pointer, will produce disas-
  970.           trous results.
  971.  
  972.           This flag does not have a  negative  form,  because  it
  973.           specifies a three-way choice.
  974.  
  975.      -fcall-saved-reg
  976.           Treat the register named reg as an allocatable register
  977.           saved  by functions.  It may be allocated even for tem-
  978.           poraries or variables that live across a  call.   Func-
  979.           tions  compiled  this  way  will  save  and restore the
  980.           register reg if they use it.
  981.  
  982.           Use of this flag for a register that has a  fixed  per-
  983.           vasive  role  in the machine's execution model, such as
  984.  
  985.  
  986.  
  987. Version 1.36        Last change: 18 June 1989                  15
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994. GCC(1)                    USER COMMANDS                    GCC(1)
  995.  
  996.  
  997.  
  998.           the stack pointer or frame pointer, will produce disas-
  999.           trous results.
  1000.  
  1001.           A different sort of disaster will result from  the  use
  1002.           of  this  flag  for a register in which function values
  1003.           may be returned.
  1004.  
  1005.           This flag does not have a  negative  form,  because  it
  1006.           specifies a three-way choice.
  1007.  
  1008.      -dletters
  1009.           Says to make debugging  dumps  at  times  specified  by
  1010.           letters.  Here are the possible letters:
  1011.  
  1012.           r
  1013.                Dump after RTL generation.
  1014.           j
  1015.                Dump after first jump optimization.
  1016.           J
  1017.                Dump after last jump optimization.
  1018.           s
  1019.                Dump after CSE (including  the  jump  optimization
  1020.                that sometimes follows CSE).
  1021.           L
  1022.                Dump after loop optimization.
  1023.           f
  1024.                Dump after flow analysis.
  1025.           c
  1026.                Dump after instruction combination.
  1027.           l
  1028.                Dump after local register allocation.
  1029.           g
  1030.                Dump after global register allocation.
  1031.           d
  1032.                Dump after delayed branch scheduling.
  1033.           m
  1034.                Print statistics on memory usage, at  the  end  of
  1035.                the run.
  1036.  
  1037.      -pedantic
  1038.           Issue all the warnings demanded by strict ANSI standard
  1039.           C; reject all programs that use forbidden extensions.
  1040.  
  1041.           Valid ANSI standard C programs should compile  properly
  1042.           with  or  without  this  option (though a rare few will
  1043.           require -ansi).  However, without this option,  certain
  1044.           GNU extensions and traditional C features are supported
  1045.           as well.  With this option, they are  rejected.   There
  1046.           is  no  reason  to  use  this option; it exists only to
  1047.           satisfy pedants.
  1048.  
  1049.           -pedantic does not cause warning messages  for  use  of
  1050.  
  1051.  
  1052.  
  1053. Version 1.36        Last change: 18 June 1989                  16
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. GCC(1)                    USER COMMANDS                    GCC(1)
  1061.  
  1062.  
  1063.  
  1064.           the  alternate  keywords whose names begin and end with
  1065.           __.
  1066.  
  1067.      -static
  1068.           On Suns running version 4, this prevents  linking  with
  1069.           the  shared libraries.  (-g has the same effect.) These
  1070.           options control the C preprocessor,  which  is  run  on
  1071.           each  C  source file before actual compilation.  If you
  1072.           use the `-E' option, nothing is done except  C  prepro-
  1073.           cessing.    Some  of  these  options  make  sense  only
  1074.           together with `-E' because  they  request  preprocessor
  1075.           output that is not suitable for actual compilation.
  1076.  
  1077.      -C   Tell the preprocessor not to  discard  comments.   Used
  1078.           with the -E option.
  1079.  
  1080.      -Idir
  1081.           Search directory dir for include files.
  1082.  
  1083.      -I-  Any directories specified with -I  options  before  the
  1084.           -I-  option  are searched only for the case of #include
  1085.           "file"; they are not searched for #include <file>.
  1086.  
  1087.           If additional directories are specified with -I options
  1088.           after  the  -I-, these directories are searched for all
  1089.           #include directives.  (Ordinarily  all  -I  directories
  1090.           are used this way.)
  1091.  
  1092.           In addition, the -I- option inhibits  the  use  of  the
  1093.           current  directory  as  the  first search directory for
  1094.           #include "file".  Therefore, the current  directory  is
  1095.           searched  only  if it is requested explicitly with -I..
  1096.           Specifying both -I- and -I. allows you to control  pre-
  1097.           cisely   which  directories  are  searched  before  the
  1098.           current one and which are searched after.
  1099.  
  1100.      -nostdinc
  1101.           Do not  search  the  standard  system  directories  for
  1102.           header  files.  Only the directories you have specified
  1103.           with  -I  options  (and  the  current   directory,   if
  1104.           appropriate) are searched.
  1105.  
  1106.           Between -nostdinc and -I-, you can eliminate all direc-
  1107.           tories from the search path except those you specify.
  1108.  
  1109.      -M   Tell the preprocessor to output  a  rule  suitable  for
  1110.           make(1)  describing  the  dependencies  of  each source
  1111.           file.  For each source file, the  preprocessor  outputs
  1112.           one  make-rule whose target is the object file name for
  1113.           that source file and whose  dependencies  are  all  the
  1114.           files  #included in it.  This rule may be a single line
  1115.           or may be continued with \-newline if it is long.
  1116.  
  1117.  
  1118.  
  1119. Version 1.36        Last change: 18 June 1989                  17
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. GCC(1)                    USER COMMANDS                    GCC(1)
  1127.  
  1128.  
  1129.  
  1130.           -M implies -E.
  1131.  
  1132.      -MM  Like -M but the output mentions  only  the  user-header
  1133.           files  included  with  #include  "file".  System header
  1134.           files included with #include <file> are omitted.
  1135.  
  1136.           -MM implies -E.
  1137.  
  1138.      -Dmacro
  1139.           Define macro macro with the empty string as its defini-
  1140.           tion.
  1141.  
  1142.      -Dmacro=defn
  1143.           Define macro macro as defn.
  1144.  
  1145.      -Umacro
  1146.           Undefine macro macro.
  1147.  
  1148.      -trigraphs
  1149.           Support ANSI C trigraphs.  You don't want to know about
  1150.           this  brain-damage.   The  -ansi  option  also has this
  1151.           effect.
  1152.  
  1153. FILES
  1154.      file.c             C source file
  1155.      file.s             assembly language file
  1156.      file.o             object file
  1157.      a.out              link edited output
  1158.      /tmp/cc*           temporary files
  1159.      LIBDIR/gcc-cpp     preprocessor
  1160.      LIBDIR/gcc-cc1     compiler
  1161.      LIBDIR/gcc-gnulib  library needed by GCC on some machines
  1162.      /lib/crt[01n].o    start-up routine
  1163.      /lib/libc.a        standard C library, see intro(3)
  1164.      /usr/include       standard directory for #include files
  1165.      LIBDIR/gcc-include standard gcc directory for #include files
  1166.  
  1167.      LIBDIR is usually /usr/local/lib.
  1168.  
  1169. SEE ALSO
  1170.      as(1), ld(1), adb(1), dbx(1), sdb(1).
  1171.  
  1172. BUGS
  1173.      Bugs should be reported  to  bug-gcc@prep.ai.mit.edu.   Bugs
  1174.      tend  actually to be fixed if they can be isolated, so it is
  1175.      in your interest to report them in such a way that they  can
  1176.      be easily reproduced.
  1177.  
  1178. COPYING
  1179.      Copyright (c) 1988 Free Software Foundation,  Inc.   Permis-
  1180.      sion  is  granted  to make and distribute verbatim copies of
  1181.      this  manual  provided  the  copyright   notice   and   this
  1182.  
  1183.  
  1184.  
  1185. Version 1.36        Last change: 18 June 1989                  18
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. GCC(1)                    USER COMMANDS                    GCC(1)
  1193.  
  1194.  
  1195.  
  1196.      permission  notice  are preserved on all copies.  Permission
  1197.      is granted to copy and distribute modified versions of  this
  1198.      manual  under  the conditions for verbatim copying, provided
  1199.      that the entire resulting derived work is distributed  under
  1200.      the  terms  of  a  permission  notice identical to this one.
  1201.      Permission is granted to copy and distribute translations of
  1202.      this  manual  into  another language, under the above condi-
  1203.      tions for modified versions,  except  that  this  permission
  1204.      notice  may be included in translations approved by the Free
  1205.      Software Foundation instead of in the original English.
  1206.  
  1207. AUTHORS
  1208.      See the GNU CC Manual for the contributors to GNU CC.
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251. Version 1.36        Last change: 18 June 1989                  19
  1252.  
  1253.  
  1254.  
  1255.